﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ProcessBase.Models;


namespace SubstrateHelper.Data
{

    public class NCDbContext : DbContext
    {

        public NCDbContext(DbContextOptions<NCDbContext> options) : base(options)
        {

        }

        public DbSet<V_MES_HX_MO> V_MES_HX_MO { get; set; }
        public DbSet<V_MES_HX_PICK> V_MES_HX_PICK { get; set; }
        public DbSet<V_MES_HX_PICK_B> V_MES_HX_PICK_B { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Entity<V_MES_HX_MO>().ToView("V_MES_HX_MO").HasNoKey();
            modelBuilder.Entity<V_MES_HX_PICK>().ToView("V_MES_HX_PICK").HasNoKey();
            modelBuilder.Entity<V_MES_HX_PICK_B>().ToView("V_MES_HX_PICK_B").HasNoKey();


        }
    }
}
